<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.jadestudio.home.dao.*" %>

<%
	java.util.Map gameDetail = (java.util.Map)request.getAttribute("gameDetail");
	// 语言
	String game_language = "";
	if (!CommonDao.isNullOrEmpty(gameDetail.get("game_language"))){
		String[] splited_game_language = gameDetail.get("game_language").toString().split(",");
		for(int i=0;i<splited_game_language.length;i++){
			if (splited_game_language[i].equals("cht"))
				game_language+="繁体中文、";
			else if (splited_game_language[i].equals("chs"))
				game_language+="简体中文、";
			else if (splited_game_language[i].equals("jpn"))
				game_language+="日文、";
			else if (splited_game_language[i].equals("eng"))
				game_language+="英文、";
			else if (splited_game_language[i].equals("kon"))
				game_language+="韩文、";	
			else
				game_language+="其它、";	
		}
		if (game_language.endsWith("、"))
			game_language = game_language.substring(0,game_language.length()-1);
	}
	// 平台
	String game_platforms = "";
	if (!CommonDao.isNullOrEmpty(gameDetail.get("game_platform_id"))){
		List<java.util.Map> gamePlatforms = (List<java.util.Map>)request.getAttribute("gamePlatforms");
		if (gamePlatforms!=null){
			for(int i=0;i<gamePlatforms.size();i++){
				game_platforms+="<a href='/game_list.do?platform="+gamePlatforms.get(i).get("game_platform_id")+"' target='_blank'>"+gamePlatforms.get(i).get("game_platform_name")+"</a>、";
			}
		}
	}
	if (game_platforms.endsWith("、"))
		game_platforms = game_platforms.substring(0,game_platforms.length()-1);
	
	// 日期
	Date publish_date = (Date)gameDetail.get("publish_date");
	
	// 售价
	String price_type = "";
	String price_icon = "";
	String price_value = "";
	if (!CommonDao.isNullOrEmpty(gameDetail.get("game_price"))){
		String[] price = gameDetail.get("game_price").toString().split(":");
		if (price.length>=2){
			price_type = price[0];
			price_value = price[1];
			
			if (price_type.equals("jpy"))
				price_icon = "¥";
			else if (price_type.equals("usd"))
				price_icon = "$";
			else if (price_type.equals("hkd"))
				price_icon = "HK$";
			else if (price_type.equals("eru"))
				price_icon = "€";
			else if (price_type.equals("ntd"))
				price_icon = "NT$";
		}
	}
	
	// 投票
	java.util.Map gameVoteList = (java.util.Map)request.getAttribute("gameVoteList");
	
	// Fami 通评分
	String[] famitsu_score = new String[4];
	if (!CommonDao.isNullOrEmpty(gameDetail.get("fami_score"))){
		famitsu_score = gameDetail.get("fami_score").toString().split(",");
	}
	else{
		famitsu_score[0]="0";
		famitsu_score[1]="0";
		famitsu_score[2]="0";
		famitsu_score[3]="0";
	}
	
	// IGN 评分
	String[] ign_score = new String[6];
	if (!CommonDao.isNullOrEmpty(gameDetail.get("ign_score"))){
		ign_score = gameDetail.get("ign_score").toString().split(",");
	}
	else{
		ign_score[0]="0";
		ign_score[1]="0";
		ign_score[2]="0";
		ign_score[3]="0";
		ign_score[4]="0";
		ign_score[5]="0";
	}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%= gameDetail.get("simplified_chinese_name") %>  - 3DS DS 游戏 资讯 攻略 发售 下载</title>
<meta name="description" content="" />
<meta name="keywords" content="<%= gameDetail.get("game_tag") %>DSDOWN 3DS DS DSI GB GBA WII WIIU Nintendo 任天堂 游戏 攻略 发售 资讯 " />
<link href="style/game_detail.css" rel="stylesheet" type="text/css" />
<link href="style/score.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style></head>

<script src="script/functions.js" type="text/javascript"></script>
<script src="script/jQuery.js" type="text/javascript"></script>
<script type="text/javascript">

	var header_count = 2;

	var sale_date = new Date(<%= publish_date.getYear()+1900 %>,<%= publish_date.getMonth() %>,<%= publish_date.getDate() %>);
	
	var price_usd = 49.99;
	var price_jpy = 5880;
	var price_jpy_notax = 5448;
	var price_jpy_tax = 5;
	var price_eur = 35;
	var price_hkd = 380;
	var price_ntd = 850;

	var rate_ign = <%= ign_score[0]%>;
	var rate_ign_1 = <%= ign_score[1]%>;
	var rate_ign_2 = <%= ign_score[2]%>;
	var rate_ign_3 = <%= ign_score[3]%>;
	var rate_ign_4 = <%= ign_score[4]%>;
	var rate_ign_5 = <%= ign_score[5]%>;	
	var rate_famitsu = 0;
	var rate_famitsu_1 = <%= famitsu_score[0]%>;
	var rate_famitsu_2 = <%= famitsu_score[1]%>;
	var rate_famitsu_3 = <%= famitsu_score[2]%>;
	var rate_famitsu_4 = <%= famitsu_score[3]%>;
	var rate_user = 0;
	var rate_user_1 = <%= gameVoteList.get("1")==null?0:gameVoteList.get("1") %>;
	var rate_user_2 = <%= gameVoteList.get("2")==null?0:gameVoteList.get("2") %>;
	var rate_user_3 = <%= gameVoteList.get("3")==null?0:gameVoteList.get("3") %>;
	var rate_user_4 = <%= gameVoteList.get("4")==null?0:gameVoteList.get("4") %>;
	var rate_user_5 = <%= gameVoteList.get("5")==null?0:gameVoteList.get("5") %>;
	var rate_user_1_p = 0;
	var rate_user_2_p = 0;
	var rate_user_3_p = 0;
	var rate_user_4_p = 0;
	var rate_user_5_p = 0;	
	var self_score = 0;
	var screenshot_expended;
	
	$(document).ready(
	function()
	{
		// 发售时间处理
		$("#saledate").text(sale_date.getYear()+1900+"年"+sale_date.getMonth()+"月"+sale_date.getDate());
		saledateTimer(sale_date)
				
		// 计算FAMI通总分
		rate_famitsu = rate_famitsu_1 + rate_famitsu_2 + rate_famitsu_3 + rate_famitsu_4;
		
		// 将媒体评分写入页面
		$("#famitsu").text(rate_famitsu);
		if ((""+rate_ign).length==1)
			$("#ign").text(rate_ign+".0");
		else
			$("#ign").text(rate_ign);
		
		var degree_famitsu;
		if (rate_famitsu<30)
			degree_famitsu = "";
		else if
			(rate_famitsu>=30 && rate_famitsu<=31) degree_famitsu = "(银殿堂)";
		else if
			(rate_famitsu>=32 && rate_famitsu<=34) degree_famitsu = "(金殿堂)";
		else if
			(rate_famitsu>=35) degree_famitsu = "(白金殿堂)";
			
		var degree_ign;
		if (rate_ign<2) 
			degree_ign = "(不堪)";
		else if (rate_ign>=2 && rate_ign<3)
			degree_ign = "(痛苦)";
		else if (rate_ign>=3 && rate_ign<4)
			degree_ign = "(可怕)";
		else if (rate_ign>=4 && rate_ign<5)
			degree_ign = "(糟糕)";
		else if (rate_ign>=5 && rate_ign<6)
			degree_ign = "(平庸)";
		else if (rate_ign>=6 && rate_ign<7)
			degree_ign = "(还行)";
		else if (rate_ign>=7 && rate_ign<8)
			degree_ign = "(很好)";
		else if (rate_ign>=8 && rate_ign<9)
			degree_ign = "(不错)";
		else if (rate_ign>=9 && rate_ign<10)
			degree_ign = "(惊喜)";
		else if (rate_ign==10)
			degree_ign = "(神作)";
		
		// 默认收起截图
		screenshot_expended = true;
		switchScreenshots();
		
		// 获取游戏下载url
		$("#downloaddiv").css("display","none");
		$("#downloadwait").css("display","inline");
		$.ajax(
		{
			type:"GET",
			url:"interface/get_game_downloads.do?pm=getGameDownloads&id=<%= gameDetail.get("game_id") %>",
			dateType:"json",
			cache: false,
			success:
				function(result)
				{
					var json = $.parseJSON(result);
					var downloadhtml = "";
					if (json.success=="true")
					{
						if (json.list.length>0)
						{
							for(var i=0;i<json.list.length;i++)
							{
								downloadhtml += "<a href='"+json.list[i].url+"' target='_blank'>"+json.list[i].name+"</a>";
							}
						}
						else
						{
							downloadhtml = "<span>暂无下载地址</span>";
						}
					}
					else
					{
						downloadhtml = "<span>获取下载地址失败，请<a href='javascript:location.reload();'>刷新</a>页面</span>";
					}
					$("#downloaddiv").html(downloadhtml);
					$("#downloaddiv").css("display","block");
					$("#downloadwait").css("display","none");
				},
			error:
				function()
				{
					$("#downloaddiv").html("<span>获取下载地址失败，请<a href='javascript:location.reload();'>刷新</a>页面</span>");
					$("#downloaddiv").css("display","block");
					$("#downloadwait").css("display","none");
				}
		});
		
		// 获取游戏购买地址
		$("#purchasediv").css("display","none");
		$("#purchasewait").css("display","block");
		$.ajax(
		{
			type:"GET",
			url:"interface/get_game_purchases.do?pm=getGamePurchases&id=<%= gameDetail.get("game_id") %>",
			dateType:"json",
			cache: false,
			success:
				function(result)
				{
					var json = $.parseJSON(result);
					var purchasehtml = "";
					if (json.success=="true")
					{
						if (json.list.length>0)
						{
							for(var i=0;i<json.list.length;i++)
							{
								purchasehtml += "<a href='"+json.list[i].url+"' target='_blank'>"+json.list[i].title+"</a><br/>";
							}
						}
						else
						{
							purchasehtml = "<span>暂无购买地址</span>";
						}
					}
					else
					{
						purchasehtml = "<span>获取购买地址失败，请<a href='javascript:location.reload();'>刷新</a>页面</span>";
					}
					$("#purchasediv").html(purchasehtml);
					$("#purchasediv").css("display","block");
					$("#purchasewait").css("display","none");
				},
			error:
				function()
				{
					$("#purchasediv").html("<span>获取购买地址失败，请<a href='javascript:location.reload();'>刷新</a>页面</span>");
					$("#purchasediv").css("display","block");
					$("#purchasewait").css("display","none");
				}
		});

		$("#rate_famitsu").text(rate_famitsu_1+"/"+rate_famitsu_2+"/"+rate_famitsu_3+"/"+rate_famitsu_4+degree_famitsu);
		$("#rate_ign").text("表现力 "+rate_ign_1+"/画面 "+rate_ign_2+"/音效 "+rate_ign_3+"/可玩性 "+rate_ign_4+"/耐玩度 "+rate_ign_5+degree_ign);
		
		// 计算用户评分
		calcStar();
		
		<% if (!CommonDao.isGreaterThanZero(gameVoteList.get("-1"))){ %>
		// 注册评分事件
		$("#vote_star").mousemove(
			function(e){
				var x = e.clientX - GetAbsolutePositionLeft(document.getElementById("vote_star"));
				self_score = (x / 40 + 0.5).toFixed(0);
				showStar(self_score);
			}
		);
		$("#vote_star").mouseout(
			function()
			{
				// 鼠标离开则重新显示原始评分
				showStar(rate_user);
			}
		);
		$("#vote_star").click(
			function()
			{
				sendStar(self_score);
			}
		);
		<% } %>
	});
	
	
	function showHeaderNav(target,menuname)
	{
		var left = $(target).offset().left;
		var top = $(target).offset().top;
		
		$(menuname).css("left", left - 1 + "px");
		$(menuname).css("top", top + 36 + "px");
		$(menuname).css("display", "inline");
		$(target).attr("class", "inlineli header_nav_li_hover");
	}
	
	function showHeaderNavDelay(target,menuname)
	{
		var fun = "showHeaderNav('"+target+"','"+menuname+"');";
		setTimeout(fun,10);
	}
	
	function hideHeaderNav(target,menuname)
	{
		setTimeout(function()
			{
				$(menuname).css("display", "none");
				$(target).attr("class", "inlineli header_nav_li");
			},10);
	}
	
	function showTip(target,tipname)
	{
		var left = $(target).offset().left;
		var top = $(target).offset().top;
		var height = $(target).height();
		
		$(tipname).css("left",left + "px");
		$(tipname).css("top",top + height + "px");
		$(tipname).css("display","block");
	}
	
	function hideTip(tipname)
	{
		$(tipname).css("display","none");
	}
	
	function showMask(target)
	{
		var left = $(target).offset().left;
		var top = $(target).offset().top;
		var width = $(target).width();
		var height = $(target).height();
		
		$("#mask").css("left",left+"px");
		$("#mask").css("top",top+"px");
		$("#mask").css("width",width+"px");
		$("#mask").css("height",height+"px");
		$("#mask").css("display","block");
	}
	
	function hideMask()
	{
		$("#mask").css("display","none");
	}
	
	function showFullMask()
	{
		var width = window.screen.width; // $(window).width();
		var height = $(document).height();
		
		$("#fullmask").css("left","0px");
		$("#fullmask").css("top","0px");
		$("#fullmask").css("width",width+"px");
		$("#fullmask").css("height",height+"px");
		$("#fullmask").css("display","block");
	}
	
	function hideFullMask()
	{
		$("#fullmask").css("display","none");
	}	
	
	function showBigPic(src)
	{
		// 将遮罩打开
		showFullMask()
		// 先显示图片再调整位置就可以将图片完整显示出来而非缩放后大小
		$("#big_img_img").attr("src",src);
		$("#big_img").css("display","block");
		var left = ($(document).width() - $("#big_img_img").width())/2;
		var top = $(document).scrollTop() + ($(window).height() - $("#big_img_img").height())/2; 
		$("#big_img").css("left", left+"px");
		$("#big_img").css("top", top+"px");
	}
	
	function hideBigPic()
	{
		$("#big_img").css("display","none");
		hideFullMask();
	}
	
	function switchScreenshots()
	{
		if (screenshot_expended)
		{
			$(".screenshots").css("height","120px");
			$(".screenshotmore").text("显示更多>>");	
		}
		else
		{
			$(".screenshots").css("height","auto");
			$(".screenshotmore").text("隐藏更多<<");
		}
		
		screenshot_expended = !screenshot_expended;
	}
	
	
	function saledateTimer(date)
	{
		var timer = setInterval(function()
		{
			var now = new Date();
			var duration = date.getTime() - now.getTime();
			if (duration>=0)
			{
				var day=Math.floor(duration/(1000 * 60 * 60 * 24));  
				var hour=Math.floor(duration/(1000*60*60)) % 24;  
				var minute=Math.floor(duration/(1000*60)) % 60;  
				var second=Math.floor(duration/1000) % 60;
				
				if (minute<10) minute="0"+minute;
				if (second<10) second="0"+second
				
				$("#timer_tip").text("倒计时 "+day+"天"+hour+"小时"+minute+"分"+second+"秒");
			}
			else
			{
				$("#timer_tip").text("已发售");
				clearInterval(timer);
			}
		},1000);
	}
	
	// 根据原始数据计算出评分、百分率等数据
	function calcStar()
	{
		var rate_total = rate_user_1 + rate_user_2 + rate_user_3 + rate_user_4 + rate_user_5;
		if (rate_total<=0) rate_total=1;
		rate_user = ((rate_user_1 * 1 + rate_user_2 * 2 + rate_user_3 * 3 + rate_user_4 * 4 + rate_user_5 * 5) / rate_total).toFixed(1);
		rate_user_1_p = (rate_user_1/rate_total * 100).toFixed(0);
		rate_user_2_p = (rate_user_2/rate_total * 100).toFixed(0);
		rate_user_3_p = (rate_user_3/rate_total * 100).toFixed(0);
		rate_user_4_p = (rate_user_4/rate_total * 100).toFixed(0);
		rate_user_5_p = (rate_user_5/rate_total * 100).toFixed(0);

		showStar(rate_user);
	}
	
	// 根据当前分数显示星级及百分比分数
	function showStar(score)
	{
		var y = (score/0.5).toFixed(0) * 40 - 400;
		$("#vote_star").css("background-position","0px "+y+"px");
		if (score.length==1)
			$("#vote_score").text(score+".0");
		else
			$("#vote_score").text(score);
		
		$("#detailstar_5").css("width",rate_user_5_p+"px");
		$("#detailstar_4").css("width",rate_user_4_p+"px");
		$("#detailstar_3").css("width",rate_user_3_p+"px");
		$("#detailstar_2").css("width",rate_user_2_p+"px");
		$("#detailstar_1").css("width",rate_user_1_p+"px");				
		$("#detailstar_5").text(rate_user_5_p+"%");
		$("#detailstar_4").text(rate_user_4_p+"%");
		$("#detailstar_3").text(rate_user_3_p+"%");
		$("#detailstar_2").text(rate_user_2_p+"%");
		$("#detailstar_1").text(rate_user_1_p+"%");
		
		/*
			0-2分 铜牌
			2-3分 银牌
			3-4分 金牌
			4-5分 白金 
		*/
		if (score<=2)
			$("#vote_medal").css("background-position","0px 0px");
		else if (score>2 && score<=3)
			$("#vote_medal").css("background-position","-45px 0px");
		else if (score>3 && score<=4)
			$("#vote_medal").css("background-position","-90px 0px");
		else if (score>4)
			$("#vote_medal").css("background-position","-135px 0px");
	}
	
	// 发送当前用户评级到服务器
	function sendStar(score)
	{
		// 将评分星上的遮罩显示
		showMask("#vote_star");
		// 将评分恢复到当前评分
		showStar(rate_user);		
		// 发送评分
		$.ajax(
		{
			type:"GET",
			url:"interface/vote_game.do?pm=voteGame&game_id=<%= gameDetail.get("game_id") %>&value="+score,
			dateType:"json",
			cache: false,
			success:
				function(result)
				{
					var json = $.parseJSON(result);
					if (json.success=="true")
					{
						// 成功
						switch(self_score)
						{
							case 1:
							case "1":
								rate_user_1++;
								break;
							case 2:
							case "2":
								rate_user_2++;
								break;
							case 3:
							case "3":
								rate_user_3++;
								break;
							case 4:
							case "4":
								rate_user_4++;
								break;
							case 5:
							case "5":
								rate_user_5++;
								break;
						}
						calcStar();
					}
					else
					{
						alert(json.info);
					}
				},
			error:
				function()
				{
					alert("投票失败，请稍后再试。");
					hideMask();
				}
				
		});
	}

</script>



<body>

<div class="tip" id="timer_tip">请稍候...</div>
<div class="tip" id="price_usd_tip">请稍候...</div>
<div class="tip" id="price_jpy_tip">请稍候...</div>
<div class="tip" id="price_hkd_tip">请稍候...</div>
<div class="tip" id="price_eur_tip">请稍候...</div>
<div class="tip" id="price_twd_tip">请稍候...</div>
<div class="tip" id="rate_ign">请稍候...</div>
<div class="tip" id="rate_famitsu">请稍候...</div>

<div class="mask" id="mask"></div>
<div class="fullmask" id="fullmask" onclick="hideBigPic();"></div>

<!-- 外层 -->
<div class="detail">

<!-- 大图片 -->
<div id="big_img" class="mask" onclick="hideBigPic();">
	<img id="big_img_img" />
</div>

<!-- 主页面 -->
<div class="main">

	<%@ include file="header.jsp" %>

	<!-- 名称 -->
	<div class="title">
		<small><a href="game_list.do?category=<%= gameDetail.get("game_type_id") %>"><%= gameDetail.get("game_type_name") %></a>&nbsp;&gt;&nbsp;<span>游戏详情</span></small>
		<small><%= gameDetail.get("game_publish_company") %></small>
		<big><%= gameDetail.get("simplified_chinese_name") %></big>
	</div>
	<!-- 名称 -->
	
	<div class="header_shadow"></div>
	
	<!-- 外框阴影 -->
	<div class="center_shadow">
		<!-- 内容 -->
		<div class="content">
      	<!-- 左侧栏 -->
      	<div class="leftdiv">
			<div class="item_general">
				<div>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("english_name"))){ %>
						<p>英语名称：<%= gameDetail.get("english_name") %></p>
					<%} %>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("japanese_name"))){ %>
						<p>日语名称：<%= gameDetail.get("japanese_name") %></p>
					<%} %>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("traditional_chinese_name"))){ %>
						<p>繁体名称：<%= gameDetail.get("traditional_chinese_name") %></p>
					<%} %>
					<p>开发厂商：<%= gameDetail.get("dev_company") %></p>	
					<p>发行厂商：<%= gameDetail.get("game_publish_company") %>(<a href="<%= gameDetail.get("game_publish_url") %>" target="_blank">进入官网</a>)</p>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("game_language"))){%>
					<p>游戏语言：<%= game_language %></p>
					<% } %>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("game_platform_id"))){ %>
					<p>发售平台：<%= game_platforms %></p>
					<% } %>
					<p>发行日期：<span onmousemove="showTip(this,'#timer_tip');" onmouseout="hideTip('#timer_tip');" style="cursor:default;" id="saledate"><%= publish_date.toString() %></span></p>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("fami_score"))){ %>
					<p>
					<span class="famitsu_title">FAMI通评分：</span>
					<span class="famitsu_red" id="famitsu" onmousemove="showTip(this,'#rate_famitsu');" onmouseout="hideTip('#rate_famitsu');" style="cursor:default;"></span>
					</p>
					<%} %>
					<% if (!CommonDao.isNullOrEmpty(gameDetail.get("ign_score"))){ %>
					<p>
					<span class="ign_title">IGN评分：</span>
					<span class="ign_gray" id="ign" onmousemove="showTip(this,'#rate_ign');" onmouseout="hideTip('#rate_ign');" style="cursor:default;"></span>
					</p>
					<%} %>
					<% if (!price_icon.equals("")){ %>
					<p>游戏售价：<span><%= price_icon %><%= price_value %></span></p>
					<%} %>
				</div>
				<img src="<%= gameDetail.get("game_img_normal") %>"/>				
			</div>
			
			<div class="clear item_getgame">
				<div class="downloadtitle">
					<big>下载试玩</big>
					<span id="downloaddiv"></span>
					<div id="downloadwait">
						获取下载地址中
					</div>
				</div>
				<div class="purchasetitle">
					<big>购买正版</big>
					<span id="purchasediv"></span>
					<div id="purchasewait">
						获取购买地址中
					</div>
				</div>
			</div>
			
				
			<div class="subtitle clear">游戏简介</div>
			<div class="item_introduce"><%= gameDetail.get("game_introduction") %></div>
			
			
			
			<div class="subtitle clear">游戏截图</div>
			
			<div class="screenshots">
			
			<% List<java.util.Map> gameScreenshots = (List<java.util.Map>)request.getAttribute("gameScreenshots"); %>
			<% for (int i=0;i<gameScreenshots.size();i++){ %>
		
			<% if (i%4==0){ %><ul class="picul"><%} %>
		
			<li class="inlineli" style="float:left;">
				<div class="screenshotitem">
					<a href="javascript:showBigPic('<%= gameScreenshots.get(i).get("game_pic_url") %>')">
						<img src="<%= gameScreenshots.get(i).get("game_pic_url") %>" />
					</a>
				</div>
			</li>
		
			<% if (i%4==3 || i>=gameScreenshots.size()-1){ %></ul><%} %>
			<% } %>
		
			<%if (gameScreenshots.size()==0){ %>
			<div class="noresult">游戏暂无截图</div>
			<%} %>
			
			</div>
			
			<% if (gameScreenshots.size()>4){ %>
			<a class="screenshotmore" href="javascript:switchScreenshots();">展开更多>></a>
			<%} %>
			
			<% List<java.util.Map> gameSimilars = (List<java.util.Map>)request.getAttribute("gameSimilars"); %>
			<% if (gameSimilars.size()>0){ %>
			<div class="subtitle clear">相关游戏</div>
			<!-- 相关游戏 -->
			<div>
				<ul class="similar_box">
					<% for(int i=0;i<gameSimilars.size();i++){ %>
					<li class="inlineli" style="float:left;">
						<a class="similar_item" href="gamedetail.do?id=<%= gameSimilars.get(i).get("game_id") %>" target="_blank">
						<div>
							<img src="<%= gameSimilars.get(i).get("game_img_small") %>" />
							<big><%= gameSimilars.get(i).get("simplified_chinese_name") %></big>
						</div>
						</a>
					</li>
					<%} %>
				</ul>
			</div>
			<!-- 相关游戏 -->
			<%} %>
			
		</div>
		<!-- left -->
		
		<!-- 右侧栏 -->
      	<div class="rightdiv">
			<!-- 评分 -->
			<div class="toplist rightbox_center">
				<div id="vote_medal" class="user_bigscore"><span id="vote_score"></span></div>
				<h1>玩家评分</h1>
				<div id="vote_star" class="user_bigstar"></div>
				<div id="star_detail" class="user_smallstar">
					<span id="detailstar_5"></span>
					<span id="detailstar_4"></span>
					<span id="detailstar_3"></span>
					<span id="detailstar_2"></span>
					<span id="detailstar_1"></span>
				</div>
			</div>
			<div class="rightbox_bottom"></div>
			<!-- 评分 -->
			
			
			<!-- 销量 -->
			<!--<div class="rightbox_top"></div>
		  <div class="toplist rightbox_center" style="height:130px">
				<h1>全球销量</h1>
			    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="200" height="100">
                  <param name="movie" value="image/gamesales.swf" />
                  <param name="quality" value="high" />
				  <param name="wmode" value="transparent" />
                  <embed src="image/gamesales.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="100" wmode="transparent"></embed>
	        </object>
			</div>
			<div class="rightbox_bottom"></div>-->
			<!-- 销量 -->
			
			<!-- 此游戏的文章 -->
			<% List<java.util.Map> articleList = (List<java.util.Map>)request.getAttribute("articleList"); %>
			<% if (articleList.size()>0){ %>
			<div class="toplist rightbox_center">
				<h1>相关文章</h1>
				<% for (int i=0;i<articleList.size();i++){ %>
					<a href="/gamedetail.do?id=<%= articleList.get(i).get("article_id") %>" title="<%=articleList.get(i).get("article_name")%>" target="_blank"><div class="toplist_icon" style="background-position:0px -<%= i*15 %>px;"></div><div class="toplist_text"><%= articleList.get(i).get("article_name") %></div></a>
				<% } %>
			</div>
			<div class="rightbox_bottom"></div>
			<%} %>
			<!-- 此游戏的文章 -->
			
			<!-- 此厂商的其它游戏 -->
			<% List<java.util.Map> gameList = (List<java.util.Map>)request.getAttribute("gameList"); %>
			<% if (gameList.size()>0){ %>
			<div class="toplist rightbox_center">
				<h1>此厂商更多游戏</h1>
				<% for (int i=0;i<gameList.size();i++){ %>
					<a href="/gamedetail.do?id=<%= gameList.get(i).get("game_id") %>" title="<%=gameList.get(i).get("simplified_chinese_name")%>" target="_blank"><div class="toplist_icon" style="background-position:0px -<%= i*15 %>px;"></div><div class="toplist_text"><%= gameList.get(i).get("simplified_chinese_name") %></div></a>
				<% } %>
			</div>
			<div class="rightbox_bottom"></div>
			<%} %>
			<!-- 此厂商的其它游戏 -->			
		</div>
		<!-- right -->
	
		<script type="text/javascript">
			limitCharacterLength(".toplist>a div",24);
		</script>
		
		</div>
		<!-- 内容 -->
	</div>
	<!-- 外框阴影 -->
	
	<div class="footer_shadow"></div>	
	
	<%@ include file="footer.jsp" %>
	
</div>
<!-- 主页面 -->
</div>
<!-- 外层 -->

</body>
</html>
